import React from "react";
import styles from "./style.scss";
import orginData from "../../lib/data5157590";
import Blossom515750 from "../../util/Blossom515750";

class Technology50 extends React.Component {
  constructor(props) {
    super(props);
    this.blowssom = new Blossom515750(orginData);
  }

  componentDidMount() {}

  renderList() {
    const { dataArr } = this.blowssom;
    // console.log(dataArr)
    return dataArr.map((item, index) => {
      return (
        <li className={styles.li} key={index}>
          <div className={styles.cell}>{item}</div>
          <div className={styles.cell}>
            <span>最低法： {this.blowssom.prevLowestData[item]}</span>
            <span>
              ---收益率：{" "}
              {this.blowssom.CPrevLowest[item] &&
                this.blowssom.CPrevLowest[item].rateIn}
            </span>
          </div>
        </li>
      );
    });
  }

  renderRote() {
    const { roteData } = Blossom515750;
    return Object.keys(roteData).map((item, index) => {
      return (
        <div className={styles.cell} key={index}>
          {`${roteData[item].num}/${roteData[item].rote}`}
        </div>
      );
    });
  }

  render() {
    return (
      <div>
        <div>总条数:{this.blowssom.dataArr.length}</div>
        <ul className={styles.ul}>{this.renderList()}</ul>
      </div>
    );
  }
}

export default Technology50;
